home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 98
/
Skunkware 98.iso
/
src
/
mail
/
db.1.85.tar.gz
/
db.1.85.tar
/
db.1.85
/
PORT
/
ptx.2.0
/
OTHER_PATCHES
< prev
Wrap
Text File
|
1993-12-21
|
2KB
|
96 lines
*** PORT/db/btree/bt_open.c.orig 1993/11/24 11:16:51
--- PORT/db/btree/bt_open.c 1993/11/24 12:38:12
***************
*** 256,262 ****
--- 256,266 ----
* Don't overflow the page offset type.
*/
if (b.psize == 0) {
+ #ifdef STBLKSIZE_NOT_AVAILABLE
+ b.psize = 4096;
+ #else
b.psize = sb.st_blksize;
+ #endif
if (b.psize < MINPSIZE)
b.psize = MINPSIZE;
if (b.psize > MAX_PAGE_OFFSET + 1)
*** PORT/db/recno/rec_open.c.orig 1993/11/29 18:26:26
--- PORT/db/recno/rec_open.c 1993/11/30 11:35:21
***************
*** 159,164 ****
--- 159,167 ----
SET(t, R_EOF);
else {
t->bt_msize = sb.st_size;
+ #ifdef MMAP_NOT_AVAILABLE
+ goto slow;
+ #else
if ((t->bt_smap = mmap(NULL, t->bt_msize,
PROT_READ, MAP_PRIVATE, rfd,
(off_t)0)) == (caddr_t)-1)
***************
*** 168,173 ****
--- 171,177 ----
t->bt_irec = ISSET(t, R_FIXLEN) ?
__rec_fmap : __rec_vmap;
SET(t, R_MEMMAPPED);
+ #endif
}
}
}
*** PORT/db/hash/hash_log2.c.orig 1993/11/24 11:10:40
--- PORT/db/hash/hash_log2.c 1993/11/24 12:38:52
***************
*** 40,50 ****
#include <sys/types.h>
! u_int
__log2(num)
! u_int num;
{
! register u_int i, limit;
limit = 1;
for (i = 0; limit < num; limit = limit << 1, i++);
--- 40,50 ----
#include <sys/types.h>
! unsigned int
__log2(num)
! unsigned int num;
{
! register unsigned int i, limit;
limit = 1;
for (i = 0; limit < num; limit = limit << 1, i++);
*** PORT/db/hash/hash.c.orig 1993/11/24 11:18:44
--- PORT/db/hash/hash.c 1993/11/24 12:38:29
***************
*** 301,307 ****
--- 301,311 ----
if (file != NULL) {
if (stat(file, &statbuf))
return (NULL);
+ #ifdef STBLKSIZE_NOT_AVAILABLE
+ hashp->BSIZE = 4096;
+ #else
hashp->BSIZE = statbuf.st_blksize;
+ #endif
hashp->BSHIFT = __log2(hashp->BSIZE);
}
*** PORT/db/hash/hash.h.orig 1993/11/24 11:20:03
--- PORT/db/hash/hash.h 1993/11/24 12:38:38
***************
*** 261,266 ****
--- 261,267 ----
#define REAL_KEY 4
/* Short hands for accessing structure */
+ #undef BSIZE
#define BSIZE hdr.bsize
#define BSHIFT hdr.bshift
#define DSIZE hdr.dsize